package com.gg.fmallspringboot.service.impl;

import com.gg.fmallspringboot.Vo.CategoryVo;
import com.gg.fmallspringboot.entity.Category;
import com.gg.fmallspringboot.mapper.CategoryMapper;
import com.gg.fmallspringboot.service.CategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    private CategoryMapper categoryMapper;

    public CategoryServiceImpl(CategoryMapper categoryMapper) {
        this.categoryMapper = categoryMapper;
    }

    @Override
    public List<CategoryVo> queryCategoryVo() {
        List<CategoryVo> categoryVos = categoryMapper.selectAllCategories2(0);
        return categoryVos;
    }

}
